package script;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class ScriptEngineTest {
	public static void main(String[] args) {
		ScriptEngineManager sem = new ScriptEngineManager();
		ScriptEngine engine = sem.getEngineByName("js");
		try {
			Object o = engine.eval("10+((1-parseInt(1/28)*28)/7+1)*10");
			System.out.println(o);
		} catch (ScriptException e) {
			e.printStackTrace();
		}
	}
	
}
